package com.quectel.grid.vo.household;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 在这里编写说明
 *
 * @author: bob
 * @email: bob.yu@quectel.com
 * @date: 2023-02-15 16:26:00
 */
@Data
@Schema
public class HouseholdAndRoomSaveVo {

    @Schema(description = "住户信息")
    private HouseholdVo householdVo;

    @Schema(description = "住户房屋信息列表")
    private List<HouseholdRoomVo> roomList;

    /************ 内部类 start ************/
    @Data
    @Schema
    @AllArgsConstructor
    @NoArgsConstructor
    public static class HouseholdVo implements Serializable {

        @Schema(description = "住户id")
        private Long id;

        @Schema(description = "网格id")
        @NotNull
        private Long gridId;

        @Schema(description = "姓名")
        @NotEmpty
        @Length(min = 1, max = 50)
        private String name;

        @Schema(description = "性别 0女1男")
        @NotNull
        private Byte gender;

        @Schema(description = "人口类型 1常住人口2流动人口")
        @NotNull
        private Byte type;

        @Schema(description = "手机号")
        @NotEmpty
        @Length(max = 20)
        private String mobile;

        @Schema(description = "证件类型")
        @NotNull
        private Byte cardType;

        @Schema(description = "证件号码")
        @NotEmpty
        private String cardNo;

        @Schema(description = "证件照片")
        private String cardImg;

        @Schema(description = "人脸照片")
        private String faceImg;

        @Schema(description = "人员特征")
        private String tags;

    }

    @Data
    @Schema
    @AllArgsConstructor
    @NoArgsConstructor
    public static class HouseholdRoomVo implements Serializable {

        @Schema(description = "网格id")
        @NotNull
        private Long gridId;

        @Schema(description = "所属楼栋Id")
        @NotNull
        private Long buildingId;

        @Schema(description = "所属楼层Id")
        @NotNull
        private Long floorId;

        @Schema(description = "所属房间Id")
        @NotNull
        private Long roomId;

        @Schema(description = "身份类别 1业主2租客3家人")
        @NotNull
        private Byte identityCategory;
    }

    /************ 内部类 end ************/

}









